package com.atguigu.newmvc2.filter;

import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.ServletRequest;
import jakarta.servlet.ServletResponse;
import jakarta.servlet.http.HttpFilter;
import org.springframework.stereotype.Component;

import java.io.IOException;

@Component
public class Myfilter extends HttpFilter {
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        System.out.println("放行前");
        chain.doFilter(request,response);
        System.out.println("放行后");
    }
}
